package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.CartItemVo;
import com.atguigu.gulimall.cart.vo.CartVo;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {

    /**
     * 获取购物车
     *
     * @return
     */
    CartVo getCart() throws ExecutionException, InterruptedException;

    /**
     * 添加购物车
     *
     * @param skuId
     * @param num
     * @return
     * @throws ExecutionException
     * @throws InterruptedException
     */
    CartItemVo addCartService(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    /**
     * 获取某一项信息
     *
     * @param skuId
     * @return
     */
    CartItemVo getCartItem(Long skuId);

    List<CartItemVo> getUserCartItems();
}
